<?php
class Form_Contents extends QForm
{
	function __construct($action,$model = 'article')
	{
		// 调用父类的构造函数
		parent::__construct('form_contents', $action);

		// 从配置文件载入表单
		$filename = rtrim(dirname(__FILE__), '/\\') . DS . 'contents_' . $model .'_form.yaml';
		$this->loadFromConfig(Helper_YAML::loadCached($filename));
		$this->addValidations(Contents::meta());
	}
}